﻿using System;
using System.ComponentModel;
using System.Runtime.InteropServices;

namespace Teigha.Core
{
	public class TempOdGiDummyCommonDraw : OdGiViewportDraw
	{
		[EditorBrowsable(EditorBrowsableState.Never)]
		public TempOdGiDummyCommonDraw(IntPtr cPtr, bool cMemoryOwn) : base(GlobalsPINVOKE.TempOdGiDummyCommonDraw_SWIGUpcast(cPtr), cMemoryOwn)
		{
			this.swigCPtr = new HandleRef(this, cPtr);
		}

		[EditorBrowsable(EditorBrowsableState.Never)]
		public static HandleRef getCPtr(TempOdGiDummyCommonDraw obj)
		{
			if (obj != null)
			{
				return obj.swigCPtr;
			}
			return new HandleRef(null, IntPtr.Zero);
		}

		public override void Dispose()
		{
			if (this.swigCPtr.Handle != IntPtr.Zero)
			{
				if (this.swigCMemOwn)
				{
					lock (this.locker)
					{
						if (this.swigCPtr.Handle != IntPtr.Zero && this.swigCMemOwn)
						{
							this.swigCMemOwn = false;
							GlobalsPINVOKE.deletePD_TempOdGiDummyCommonDraw(this.swigCPtr);
						}
					}
					this.swigCMemOwn = false;
				}
				this.swigCPtr = new HandleRef(null, IntPtr.Zero);
			}
			GC.SuppressFinalize(this);
			base.Dispose();
		}

		public new virtual OdGiRegenType regenType()
		{
			OdGiRegenType result = (OdGiRegenType)GlobalsPINVOKE.TempOdGiDummyCommonDraw_regenType(this.swigCPtr);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public new virtual bool regenAbort()
		{
			bool result = GlobalsPINVOKE.TempOdGiDummyCommonDraw_regenAbort(this.swigCPtr);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public new virtual bool isDragging()
		{
			bool result = GlobalsPINVOKE.TempOdGiDummyCommonDraw_isDragging(this.swigCPtr);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public new virtual uint numberOfIsolines()
		{
			uint result = GlobalsPINVOKE.TempOdGiDummyCommonDraw_numberOfIsolines(this.swigCPtr);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public new virtual double deviation(OdGiDeviationType t, OdGePoint3d p)
		{
			double result = GlobalsPINVOKE.TempOdGiDummyCommonDraw_deviation(this.swigCPtr, (int)t, OdGePoint3d.getCPtr(p));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		private object locker = new object();

		private HandleRef swigCPtr;
	}
}
